
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>ambient.extract_profile &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="ambient.add_data" href="ambient.add_data.html" />
    <link rel="prev" title="ambient.fill_nc_db" href="ambient.fill_nc_db.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="ambient-extract-profile">
<h1>ambient.extract_profile<a class="headerlink" href="#ambient-extract-profile" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="ambient.extract_profile">
<code class="sig-prename descclassname">ambient.</code><code class="sig-name descname">extract_profile</code><span class="sig-paren">(</span><em class="sig-param">data</em>, <em class="sig-param">z_col=0</em>, <em class="sig-param">z_start=50</em>, <em class="sig-param">p_col=None</em>, <em class="sig-param">P_atm=101325.0</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/ambient.html#extract_profile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#ambient.extract_profile" title="Permalink to this definition">¶</a></dt>
<dd><p>Function to extract a CTD profile with monotonically increasing depth</p>
<p>This function scans a complete CTD profile data array looking for 
direction reversals at the top and bottom of the profile.  It then removes
all reversals, yielding a single profile with monotonically increasing 
depth.  This is particularly useful for CTD datasets that include both the
up and down cast or that have not been preprocessed to remove the surface 
entry and swaying at the top and bottom of the profile.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>data</strong><span class="classifier">ndarray</span></dt><dd><p>Contains the complete CTD dataset in <cite>numpy.array</cite> format.  All 
columns will be preserved; only the depth column will be used to make 
decisions.</p>
</dd>
<dt><strong>z_col</strong><span class="classifier">integer, default is 0</span></dt><dd><p>Column number of the column containing the depth data.  The first 
column is numbered zero.</p>
</dd>
<dt><strong>z_start</strong><span class="classifier">float, default is 50</span></dt><dd><p>Depth over which reversals are considered to be at the top of the 
profile.  If a depth reversal is found below this value, the profile
will be assumed to end there.  The top of the profile will be either
the first row of data or the lowest row of data containing a reversal
for which <cite>z</cite> &lt; <cite>z_start</cite>.</p>
</dd>
<dt><strong>p_col</strong><span class="classifier">integer, default is None</span></dt><dd><p>Column number of the column containing the pressure data.  If the
profile is artificially extended to the free surface, the pressure
must approach atmospheric pressure.</p>
</dd>
<dt><strong>P_amt</strong><span class="classifier">float, default is 101325</span></dt><dd><p>Value for atmospheric pressure.  This function does not do any unit
conversion, so if the pressure units passed to this function are not
Pa or the pressure is different than standard atmospheric pressure, 
then the correct value should be specified.</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>If the start of the profile is found to occur below <cite>z</cite> = 0, then a row 
will be added to the top of the profile with depth <cite>z</cite> = 0 and all other 
values equal to their value on the next row of the profile.  This is 
generally needed by interpolation methods in the <code class="docutils literal notranslate"><span class="pre">TAMOC</span></code> simulation 
suite that require data throughout the water column.</p>
<p>This function is for use in creating a CTD data array before it is 
added to a netCDF dataset.  Once the depths have been added to a netCDF 
dataset, the methods defined in this module do not allow the depth to be
further changed.</p>
</dd></dl>

</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../../index.html">Documentation overview</a><ul>
  <li><a href="../../user_manual.html">TAMOC User Manual</a><ul>
  <li><a href="../../modules/ambient.html">Overview of Ambient Module</a><ul>
      <li>Previous: <a href="ambient.fill_nc_db.html" title="previous chapter">ambient.fill_nc_db</a></li>
      <li>Next: <a href="ambient.add_data.html" title="next chapter">ambient.add_data</a></li>
  </ul></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../../_sources/autodoc/ambient/ambient.extract_profile.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>